package com.hdoit.kylin.web.document.modelconfig;

import com.hdoit.kylin.web.document.providers.AchievementStateProvider;
import com.hdoit.kylin.web.document.providers.AchievementTypeProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;
/**
*@author liyaochong
*@email
*@createtime 2017年07月19日 10:05:26
*@comment
*/
public class AchievementConfig extends ModelMetadataAttributeConfiguration{
	public AchievementConfig(){
		this.setProperty("authors")
			.hasAttribute(new DisplayNameAttribute("作者姓名"))
			.hasAttribute(new RequiredAttribute("作者姓名为必填项"));
		
		this.setProperty("achievementName")
			.hasAttribute(new DisplayNameAttribute("成果名称"))
			.hasAttribute(new RequiredAttribute("成果名称为必填项"));
		
		this.setProperty("publishDate")
			.hasAttribute(new DisplayNameAttribute("发表时间"))
			.hasAttribute(new RequiredAttribute("发表时间为必填项"))
			.hasAttribute(new DateTimeAttribute());
		
		this.setProperty("publishName")
			.hasAttribute(new DisplayNameAttribute("认证单位"))
			.hasAttribute(new RequiredAttribute("认证单位为机构或出版社"));
		
		this.setProperty("comments")
			.hasAttribute(new DisplayNameAttribute("描述"));
		
		this.setProperty("type")
			.hasAttribute(new DisplayNameAttribute("成果类型"))
			.hasAttribute(new DropDownListAttribute(new AchievementTypeProvider()))
			.hasAttribute(new RequiredAttribute("成果类型为必填项"));
		
		this.setProperty("state")
			.hasAttribute(new DisplayNameAttribute("公开状态"))
			.hasAttribute(new RequiredAttribute("公开状态为必填项"))
			.hasAttribute(new DropDownListAttribute(new AchievementStateProvider()));
    	
	
	}
}